import http from "@/utils/request";

export default{
    /**
     * 查询报表模板列表
     * @param  params 
     * @returns 
     */
    async getList(params){
        return await http.get("/api/dtbbIndex/list",params);
    },
    /**
     * 查询报表模板列表树形
     * @param  params 
     * @returns 
     */
    async getTreeList(params){
        return await http.get("/api/dtbbIndex/treeList",params);
    },
    /**
     * 查询报表数据
     * @param  params 
     * @returns 
     */
    async getBbData(params){
        return await http.get("/api/dtbb/getBbData",params);
    },

    /**
     * 查询报表数据(条件)
     * @param  params 
     * @returns 
     */
    async getBbDataByQuery(params){
        return await http.get("/api/dtbb/getBbDataByQuery",params);
    },
    
    /**
    * 添加
    * @returns
    */
    async add(params){
        return await http.post("/api/dtbbIndex/add",params)
    },
    /**
    * 修改
    * @returns
    */
    async update(params){
        return await http.put("/api/dtbbIndex/update",params)
    },

    //删除
    async delete(params) {
        return await http.delete('/api/dtbbIndex/delete', params);
        
    },

    async downloadExcel(params) {
        return await http.get('/api/dtbb/DownloadMyExcel', params);
        
    },
    /**
    * 修改审核状态
    * @returns
    */
    async updateApprove(params){
        return await http.put("/api/dtbbIndex/updateApprove",params)
    },
}